package com.tgy.helloworld.config;

import lombok.Data;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/***
 * @ClassName: Dog
 * @Description:
 * @Auther: 送一一块二向箔
 * @Date: 14:29 2021/12/23
 * @version : V1.0
 */
@Component //注册bean
@ConfigurationProperties(prefix = "dog")
@Data
@ToString
public class Dog {

    //可以直接这样注入值
    /*@Value("阿黄")*/
    private String name;
    /*@Value("18")*/
    private Integer age;
}
